<style include="settings-shared">
  .icon-more-vert {
    background-color: none;
  }

  .printer-name {
    flex: 1;
  }

  .list-item:focus-within {
    background-color: var(--cros-highlight-color);
    outline: none;
  }
</style>
<div focus-row-container>
  <div id="entry" class="list-item" focus-row-control focus-type="entry">
    <div class="printer-name text-elide">
      <span id="printerName" aria-hidden="true">
          <iron-icon
            hidden="[[!printerEntry.printerInfo.isManaged]]"
            icon="cr20:domain">
          </iron-icon>
          [[printerEntry.printerInfo.printerName]]
      </span>
      <div id="printerSubtext" hidden="[[!subtext]]" class="secondary"
          aria-hidden="true">
        [[subtext]]
      </div>
    </div>
    <template is="dom-if"
        if="[[showActionsMenu_(printerEntry.printerType)]]">
      <cr-icon-button id="moreActions" class="icon-more-vert"
          on-click="onOpenActionMenuTap_" title="$i18n{moreActions}"
          aria-labelledby="printerName" focus-row-control
          focus-type="moreActions" tabindex$="[[tabindex]]">
      </cr-icon-button>
    </template>
    <template is="dom-if"
        if="[[isDiscoveredPrinter_(printerEntry.printerType)]]">
      <cr-button id="setupPrinterButton"
          on-click="onAddDiscoveredPrinterTap_"
          aria-label$="[[getSetupButtonAria_()]]"
          focus-row-control
          focus-type="setupPrinterButton"
          disabled="[[isConfigureDisabled_(userPrintersAllowed,
              savingPrinter)]]">
        $i18n{setupPrinter}
      </cr-button>
    </template>
    <template is="dom-if"
        if="[[isAutomaticPrinter_(printerEntry.printerType)]]">
      <cr-button id="automaticPrinterButton" class="save-printer-button"
          on-click="onAddAutomaticPrinterTap_"
          aria-label$="[[getSaveButtonAria_()]]"
          focus-row-control
          focus-type="automaticPrinterButton"
          disabled="[[isConfigureDisabled_(userPrintersAllowed,
              savingPrinter)]]">
        $i18n{savePrinter}
      </cr-button>
    </template>
    <template is="dom-if"
        if="[[isPrintServerPrinter_(printerEntry.printerType)]]">
      <cr-button id="savePrinterButton"
      class="save-printer-button" on-click="onAddServerPrinterTap_"
          aria-label$="[[getSaveButtonAria_()]]"
          focus-row-control
          focus-type="savePrinterButton"
          disabled="[[isConfigureDisabled_(userPrintersAllowed,
              savingPrinter)]]">
        $i18n{savePrinter}
      </cr-button>
    </template>
  </div>
</div>
